﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using AVCare.LMS.Util;

namespace AVCare.LMS.DataAccess
{
    internal class HelperFactory
    {
        public static IHelper GetHelper(string helperName)
        {
            Assembly instance = Assembly.Load(SystemConfigurationManager.DataProvider);
            //从配置文件中读取具体适配器类名
            Type type = instance.GetType(string.Format("AVCare.LMS.LocalData.{0}", helperName));
            ConstructorInfo construtor = type.GetConstructor(new Type[0]);
            return (IHelper)construtor.Invoke(null);

        }
    }
}
